package com.mars.module.admin.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.mars.module.system.entity.BaseEntity;

import java.time.LocalDateTime;

/**
 * 业务记录对象 sys_business
 *
 * @author mars
 * @date 2024-04-02
 */

@Data
@ApiModel(value = "业务记录对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_business")
public class SysBusiness {

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 粮食
     */
    @Excel(name = "粮食")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "粮食")
    private Long foodId;

    @TableField(exist = false)
    @ApiModelProperty(value = "粮食名称")
    private String foodName;
    /**
     * 数量
     */
    @Excel(name = "数量")
    @ApiModelProperty(value = "数量")
    private int amount;

    /**
     * 流水号
     */
    @Excel(name = "流水号")
    @ApiModelProperty(value = "流水号")
    private String serialNo;
    /**
     * 业务类型
     */
    @Excel(name = "业务类型")
    @ApiModelProperty(value = "业务类型")
    private String type;
    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remark;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人ID")
    private Long createById;

    @TableField(exist = false)
    @ApiModelProperty(value = "创建人姓名")
    private String createName;

}
